Overloading and Inheritance

نویسندگان

  • Davide Ancona
  • Sophia Drossopoulou
  • Elena Zucca
چکیده

Overloading allows several function definitions for the same name, distinguished primarily through different argument types; it is typically resolved at compile-time. Inheritance allows subclasses to define more special versions of the same function; it is typically resolved at run-time. Modern object-oriented languages incorporate both features, usually in a type-safe manner. However, the combination of these features sometimes turns out to have surprising, and even counterintuitive, effects. We discuss why we consider these effects inappropriate, and suggest alternatives. We explore the design space by isolating the main issues involved and analyzing their interplay and suggest a formal framework describing static overloading resolution and dynamic function selection, abstracting from other language features. We believe that our framework clarifies the thought process going on at lan-

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Comparative Study of the Function Overloading and Function Overriding Using C++

In the Object-Oriented Programming Systems (OOPS), these two concepts namely function overloading and function overriding are a bit confusing to the programmers. In this article this confusion is tried to be removed. Both of these are the concepts which come under the polymorphism (poly means many and morph mean forms). In the article the comparison is done in between them. For the new programm...

متن کامل

Dynamic overloading with copy semantics in object-oriented languages: a formal account

Mainstream object-oriented languages often fail to provide complete powerful features altogether, such as, multiple inheritance, dynamic overloading and copy semantics of inheritance. In this paper we present a core object-oriented imperative language that integrates all these features in a formal framework. We define a static type system and a translation of the language into the meta-language...

متن کامل

An Operational Semantics for Foops Extended Abstract

FOOPS is a functional, concurrent, object-oriented language. We give a structural operational semantics for FOOPS, considering features such as: classes of objects with associated methods and attributes, object identity, dynamic object creation and deletion, overloading, polymorphism, inheritance with overriding, concurrency, nondeterminism and atomic execution.

متن کامل

How to Express C++ Concepts in Fortran90

This paper summarizes techniques for emulating in Fortran90 the most important object-oriented concepts of C++: classes (including abstract data types, encapsulation and function overloading), inheritance and dynamic dispatching.

متن کامل

Combining Inheritance and Parametric Polymorphism in a Functional Database Language

We consider extending a functional database language to support subtyping, inheritance and method overloading. We do so by extending previous work on type inference with subtypes for the pure calculus to cater for structured types, ML-style parametric polymorphism and overloaded function deenitions. We attach semantics to overloaded functions by developing a generalisation of best-t pattern-mat...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001